<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<ul class="father">
  <li>li1</li>
  <li>li2</li>
  <li>li3</li>
</ul>
<script>
  var father = document.querySelector('.father');
  var li2 = father.children[1];

  console.log(li2.previousSibling); // => #text
  console.log(li2.nextSibling); // => #text
  console.log(li2.previousElementSibling); // => <li>li1</li>
  console.log(li2.nextElementSibling);  // => <li>li3</li>
</script>
</body>
</html>